home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / realdir.zip / REALDIR.DOC < prev   
Text File  |  1991-12-30  |  3KB  |  80 lines

  1.                          RealDir.BAS
  2.                By Rich Geldreich December 1991
  3. I don't guarantee anything about this program! You may use it
  4. in  any way  you  wish as long as you don't make any money of
  5. it!
  6.  
  7.    RealDir includes a QuickBASIC 4.5 subprogram, called
  8. SelectFile, which emulates QuickBASIC's "Open Program" menu.
  9. It uses many of the same keys and also looks similar to QB's
  10. open program menu.
  11.  
  12. Notes about using RealDir.BAS in your programs...
  13.  
  14. To call up the "Choose File" menu, simply call the SelectFile
  15. subprogram like this:
  16.  
  17. SelectFile FileName$, Status
  18.  
  19. Where FileName$ is the filename(and full path) selected, and
  20. Status is a flag telling either the FileName$ is good or the
  21. user aborted by pressing Escape.
  22.  
  23. AFTER SELECTFILE IS CALLED, THE CURRENT DIRECTORY(AND
  24. POSSIBLY THE DRIVE IS CHANGED DEPENDING ON WHAT THE USER DID.
  25. To remedy this, I have included two calls called "RealPath"
  26. and "RestorePath". RealPath returns the current path and
  27. RestorePath restores a path(the reason why QB's CHDIR command
  28. can't be used is because the current drive may have to be
  29. changed- CHDIR can't do that).  If you don't want the current
  30. directory or drive to change, save the path in a string, call
  31. SelectFile, and restore the current path with RestorePath,
  32. something like this:
  33.  
  34. OldPath$=RealPath$
  35. SelectFile FileName$,Status
  36. RestorePath OldPath$
  37.  
  38. Or better yet- just make the subprogram do that and you can
  39. forget about it.
  40.  
  41. WARNING: if RealPath$ is called and the current drive isn't
  42. ready, the subprogram will "hang up" and you will have to
  43. reboot the system. Use it with caution(on hard drives this
  44. doesn't create a problem but on a floppy drive system this
  45. does).
  46.  
  47. To be able to use the program, you must start up QuickBASIC
  48. with /l, like this:
  49.  
  50. QB /l
  51.  
  52. Otherwise, you will receive a "Subprogram Not Defined" or
  53. similar error. (The program uses Call Interrupt and Call
  54. InterruptX to call DOS.)
  55.  
  56. Keys to use:
  57.  
  58.  
  59. Tab: changes between the Files window and Directory window.
  60. Enter: selects whatever is below the highlighted cursor.
  61. A-Z,a-z,0-9: all search for the next occurrence of a name
  62. beginning with the pressed letter/number.
  63. Escape: aborts(sets the Status flag to 2)
  64. Arrow keys: move the cursor.
  65. Home & End keys: moves cursor to the beginning or ending of
  66. list.
  67.  
  68. I haven't completely tested this program! Try it out
  69. thoroughly before you use it in your programs! (especially
  70. make sure that the correct number of drives for your system's
  71. setup are in the Directories window... I really don't trust
  72. the NumDrives function yet.)
  73.  
  74. For any questions, comments, or suggestions, write/call at:
  75. Rich Geldreich
  76. 410 Market St.
  77. Gloucester City, New Jersey 08030
  78. (609)-456-0721
  79.  
  80. Have fun!